import 'package:flutter_app/class/MyApp5.dart';
import 'package:flutter/material.dart';

class MyApp6 extends StatelessWidget {
  const MyApp6({super.key});

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return const MaterialApp(home: StatefullApp());
  }
}

class StatefullApp extends StatefulWidget {
  const StatefullApp({super.key});

  @override
  State<StatefullApp> createState() => MyApp6Widget();
}

class MyApp6Widget extends State<StatefullApp> {
  final stackView = Stack(
    alignment: const Alignment(0.0, 0.75),
    children: [
      const CircleAvatar(
        backgroundImage: NetworkImage(
            'https://gips0.baidu.com/it/u=1690853528,2506870245&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024'),
        radius: 100.0,
      ),
      Container(
        decoration: const BoxDecoration(color: Colors.black45),
        child: const Text(
          'Mia B',
          style: TextStyle(
              fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white),
        ),
      ),
    ],
  );

  final stackView2 = Stack(
    children: [
      Container(
        margin: const EdgeInsets.fromLTRB(0, 0, 0, 0),
        child: Image.network(
            'https://gips2.baidu.com/it/u=844435709,4181700723&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280'),
      )
    ],
  );

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      decoration: const BoxDecoration(
          image: DecorationImage(
              image: NetworkImage(
                  'https://gips1.baidu.com/it/u=1746086795,2510875842&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024'),
              fit: BoxFit.cover)),
      child: Scaffold(
        backgroundColor: Colors.transparent,
        appBar: AppBar(
          elevation: 0,//去掉导航栏
          backgroundColor: Colors.transparent,
          title: const Text(
            '样式Demo6',
            style: TextStyle(fontSize: 18.0),
          ),
          actions: [
            IconButton(
                icon: const Icon(Icons.arrow_right),
                onPressed: () {
                  Navigator.of(context)
                      .push(MaterialPageRoute(builder: (context) {
                    return const MyApp5();
                  }));
                })
          ],
        ),
        //body: stackView2,
      ),
    );
  }
}
